package com.haizhi.bean;

// Generated 2016-8-15 17:44:37 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity: 
 */
@Entity
@Table(name = "tb_user", catalog = "db_lemon3d")
public class TbUser implements java.io.Serializable {

	/** 
	 * ��id������.
	 */

	private Integer userId;

	/** 
	 * �˺�.
	 */

	private String userAccount;

	/** 
	 * �û��ǳ�.
	 */

	private String userName;

	/** 
	 * ����.
	 */

	private String userPassword;

	/** 
	 * �ֻ�����.
	 */

	private String userPhone;

	/** 
	 * �û��Ա�.
	 */

	private String userSex;

	/** 
	 * �û����.
	 */

	private String userDetails;

	/** 
	 * �û���ע����.
	 */

	private int userFollowerCount;

	/** 
	 * �û���˿����.
	 */

	private int userFansCount;

	/** 
	 * �ղ���Ʒ��.
	 */

	private int userCollectionCount;

	/** 
	 * ע��ʱ��.
	 */

	private Date userRegisterTime;

	/** 
	 * �ϴε�¼ʱ��.
	 */

	private Date userLoginTime;

	/** 
	 * ���ϴε�¼ʱ��.
	 */

	private Date userLastLoginTime;

	/** 
	 * �û�״̬��1Ϊ������0Ϊ��������.
	 */

	private int userStatus;

	/** 
	 * �ܱ�����.
	 */

	private String userPasswordQuestion;

	/** 
	 * �ܱ���.
	 */

	private String userPasswordAnswer;

	/** 
	 * �û���ǰtoken.
	 */

	private String userCurrentToken;

	private Set<TbUserActivity> tbUserActivities = new HashSet<TbUserActivity>(
			0);

	private Set<TbUserFollow> tbUserFollowsForFollowUserId = new HashSet<TbUserFollow>(
			0);

	private Set<TbUserMessage> tbUserMessagesForPostUserId = new HashSet<TbUserMessage>(
			0);

	private Set<TbComment> tbComments = new HashSet<TbComment>(0);

	private Set<TbUserFollow> tbUserFollowsForUserId = new HashSet<TbUserFollow>(
			0);

	private Set<TbPost> tbPosts = new HashSet<TbPost>(0);

	private Set<TbUserCollection> tbUserCollections = new HashSet<TbUserCollection>(
			0);

	private Set<TbFeed> tbFeedsForUserId = new HashSet<TbFeed>(0);

	private Set<TbReply> tbReplies = new HashSet<TbReply>(0);

	private Set<TbProduct> tbProducts = new HashSet<TbProduct>(0);

	private Set<TbUserMessage> tbUserMessagesForReceiveUserId = new HashSet<TbUserMessage>(
			0);

	private Set<TbFeed> tbFeedsForTargetId = new HashSet<TbFeed>(0);

	private Set<TbUserFollow> tbUserFollowsForUserId_1 = new HashSet<TbUserFollow>(
			0);

	public TbUser() {
	}

	public TbUser(String userAccount, String userName, String userPassword,
			int userFollowerCount, int userFansCount, int userCollectionCount,
			Date userRegisterTime, int userStatus) {
		setUserAccount(userAccount);
		setUserName(userName);
		setUserPassword(userPassword);
		setUserFollowerCount(userFollowerCount);
		setUserFansCount(userFansCount);
		setUserCollectionCount(userCollectionCount);
		setUserRegisterTime(userRegisterTime);
		setUserStatus(userStatus);
	}

	public TbUser(String userAccount, String userName, String userPassword,
			String userPhone, String userSex, String userDetails,
			int userFollowerCount, int userFansCount, int userCollectionCount,
			Date userRegisterTime, Date userLoginTime, Date userLastLoginTime,
			int userStatus, String userPasswordQuestion,
			String userPasswordAnswer, String userCurrentToken,
			Set<TbUserActivity> tbUserActivities,
			Set<TbUserFollow> tbUserFollowsForFollowUserId,
			Set<TbUserMessage> tbUserMessagesForPostUserId,
			Set<TbComment> tbComments,
			Set<TbUserFollow> tbUserFollowsForUserId, Set<TbPost> tbPosts,
			Set<TbUserCollection> tbUserCollections,
			Set<TbFeed> tbFeedsForUserId, Set<TbReply> tbReplies,
			Set<TbProduct> tbProducts,
			Set<TbUserMessage> tbUserMessagesForReceiveUserId,
			Set<TbFeed> tbFeedsForTargetId) {
		setUserAccount(userAccount);
		setUserName(userName);
		setUserPassword(userPassword);
		setUserPhone(userPhone);
		setUserSex(userSex);
		setUserDetails(userDetails);
		setUserFollowerCount(userFollowerCount);
		setUserFansCount(userFansCount);
		setUserCollectionCount(userCollectionCount);
		setUserRegisterTime(userRegisterTime);
		setUserLoginTime(userLoginTime);
		setUserLastLoginTime(userLastLoginTime);
		setUserStatus(userStatus);
		setUserPasswordQuestion(userPasswordQuestion);
		setUserPasswordAnswer(userPasswordAnswer);
		setUserCurrentToken(userCurrentToken);
		setTbUserActivities(tbUserActivities);
		setTbUserFollowsForFollowUserId(tbUserFollowsForFollowUserId);
		setTbUserMessagesForPostUserId(tbUserMessagesForPostUserId);
		setTbComments(tbComments);
		setTbUserFollowsForUserId(tbUserFollowsForUserId);
		setTbPosts(tbPosts);
		setTbUserCollections(tbUserCollections);
		setTbFeedsForUserId(tbFeedsForUserId);
		setTbReplies(tbReplies);
		setTbProducts(tbProducts);
		setTbUserMessagesForReceiveUserId(tbUserMessagesForReceiveUserId);
		setTbFeedsForTargetId(tbFeedsForTargetId);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "user_id", unique = true, nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "user_account", nullable = false, length = 30)
	public String getUserAccount() {
		return this.userAccount;
	}

	public void setUserAccount(String userAccount) {
		this.userAccount = userAccount;
	}

	@Column(name = "user_name", nullable = false, length = 30)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "user_password", nullable = false, length = 40)
	public String getUserPassword() {
		return this.userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	@Column(name = "user_phone", length = 30)
	public String getUserPhone() {
		return this.userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	@Column(name = "user_sex", length = 2)
	public String getUserSex() {
		return this.userSex;
	}

	public void setUserSex(String userSex) {
		this.userSex = userSex;
	}

	@Column(name = "user_details", length = 200)
	public String getUserDetails() {
		return this.userDetails;
	}

	public void setUserDetails(String userDetails) {
		this.userDetails = userDetails;
	}

	@Column(name = "user_follower_count", nullable = false)
	public int getUserFollowerCount() {
		return this.userFollowerCount;
	}

	public void setUserFollowerCount(int userFollowerCount) {
		this.userFollowerCount = userFollowerCount;
	}

	@Column(name = "user_fans_count", nullable = false)
	public int getUserFansCount() {
		return this.userFansCount;
	}

	public void setUserFansCount(int userFansCount) {
		this.userFansCount = userFansCount;
	}

	@Column(name = "user_collection_count", nullable = false)
	public int getUserCollectionCount() {
		return this.userCollectionCount;
	}

	public void setUserCollectionCount(int userCollectionCount) {
		this.userCollectionCount = userCollectionCount;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "user_register_time", nullable = false, length = 19)
	public Date getUserRegisterTime() {
		return this.userRegisterTime;
	}

	public void setUserRegisterTime(Date userRegisterTime) {
		this.userRegisterTime = userRegisterTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "user_login_time", length = 19)
	public Date getUserLoginTime() {
		return this.userLoginTime;
	}

	public void setUserLoginTime(Date userLoginTime) {
		this.userLoginTime = userLoginTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "user_last_login_time", length = 19)
	public Date getUserLastLoginTime() {
		return this.userLastLoginTime;
	}

	public void setUserLastLoginTime(Date userLastLoginTime) {
		this.userLastLoginTime = userLastLoginTime;
	}

	@Column(name = "user_status", nullable = false)
	public int getUserStatus() {
		return this.userStatus;
	}

	public void setUserStatus(int userStatus) {
		this.userStatus = userStatus;
	}

	@Column(name = "user_password_question", length = 50)
	public String getUserPasswordQuestion() {
		return this.userPasswordQuestion;
	}

	public void setUserPasswordQuestion(String userPasswordQuestion) {
		this.userPasswordQuestion = userPasswordQuestion;
	}

	@Column(name = "user_password_answer", length = 50)
	public String getUserPasswordAnswer() {
		return this.userPasswordAnswer;
	}

	public void setUserPasswordAnswer(String userPasswordAnswer) {
		this.userPasswordAnswer = userPasswordAnswer;
	}

	@Column(name = "user_current_token")
	public String getUserCurrentToken() {
		return this.userCurrentToken;
	}

	public void setUserCurrentToken(String userCurrentToken) {
		this.userCurrentToken = userCurrentToken;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUser")
	public Set<TbUserActivity> getTbUserActivities() {
		return this.tbUserActivities;
	}

	public void setTbUserActivities(Set<TbUserActivity> tbUserActivities) {
		this.tbUserActivities = tbUserActivities;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUserByFollowUserId")
	public Set<TbUserFollow> getTbUserFollowsForFollowUserId() {
		return this.tbUserFollowsForFollowUserId;
	}

	public void setTbUserFollowsForFollowUserId(
			Set<TbUserFollow> tbUserFollowsForFollowUserId) {
		this.tbUserFollowsForFollowUserId = tbUserFollowsForFollowUserId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUserByPostUserId")
	public Set<TbUserMessage> getTbUserMessagesForPostUserId() {
		return this.tbUserMessagesForPostUserId;
	}

	public void setTbUserMessagesForPostUserId(
			Set<TbUserMessage> tbUserMessagesForPostUserId) {
		this.tbUserMessagesForPostUserId = tbUserMessagesForPostUserId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUser")
	public Set<TbComment> getTbComments() {
		return this.tbComments;
	}

	public void setTbComments(Set<TbComment> tbComments) {
		this.tbComments = tbComments;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUserByUserId")
	public Set<TbUserFollow> getTbUserFollowsForUserId() {
		return this.tbUserFollowsForUserId;
	}

	public void setTbUserFollowsForUserId(
			Set<TbUserFollow> tbUserFollowsForUserId) {
		this.tbUserFollowsForUserId = tbUserFollowsForUserId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUser")
	public Set<TbPost> getTbPosts() {
		return this.tbPosts;
	}

	public void setTbPosts(Set<TbPost> tbPosts) {
		this.tbPosts = tbPosts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUser")
	public Set<TbUserCollection> getTbUserCollections() {
		return this.tbUserCollections;
	}

	public void setTbUserCollections(Set<TbUserCollection> tbUserCollections) {
		this.tbUserCollections = tbUserCollections;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUserByUserId")
	public Set<TbFeed> getTbFeedsForUserId() {
		return this.tbFeedsForUserId;
	}

	public void setTbFeedsForUserId(Set<TbFeed> tbFeedsForUserId) {
		this.tbFeedsForUserId = tbFeedsForUserId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUser")
	public Set<TbReply> getTbReplies() {
		return this.tbReplies;
	}

	public void setTbReplies(Set<TbReply> tbReplies) {
		this.tbReplies = tbReplies;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUser")
	public Set<TbProduct> getTbProducts() {
		return this.tbProducts;
	}

	public void setTbProducts(Set<TbProduct> tbProducts) {
		this.tbProducts = tbProducts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUserByReceiveUserId")
	public Set<TbUserMessage> getTbUserMessagesForReceiveUserId() {
		return this.tbUserMessagesForReceiveUserId;
	}

	public void setTbUserMessagesForReceiveUserId(
			Set<TbUserMessage> tbUserMessagesForReceiveUserId) {
		this.tbUserMessagesForReceiveUserId = tbUserMessagesForReceiveUserId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUserByTargetId")
	public Set<TbFeed> getTbFeedsForTargetId() {
		return this.tbFeedsForTargetId;
	}

	public void setTbFeedsForTargetId(Set<TbFeed> tbFeedsForTargetId) {
		this.tbFeedsForTargetId = tbFeedsForTargetId;
	}



}
